<template>
	<view class="content">
		<view class="title">搜索结果</view>
		<view class="article-list" v-for="(item,key) in newsRows" :key="key">
			<!-- 文章列表组件 -->
			<ArticleList v-for="(article,index) in item" :key="index" :article="article"
				 goDetailsUrl="../newsDetails/newsDetails?id=">
			</ArticleList>
		</view>
	</view>
</template>

<script>
	import {
		http,
		getImg
	} from "../../utils/request.js"
	export default {
		data() {
			return {
				newsRows:{}
			}
		},
		onLoad(data) {
			let that = this;
			http({
				url: "/prod-api/press/press/list",
				data: {
					title: data.search
				},
			}).then((res) => {
				that.newsRows = {rows:res.data.rows};
			})
		},
		methods: {
			
		}
	}
</script>

<style>
	.content{
		padding: .5rem;
		box-sizing: border-box;
		background-color: aliceblue;
	}
	.title{
		font-size: 1.6rem;
		color: #7f8c8d;
		text-align: left;
	}
	.article-list {
		display: flex;
		flex-direction: column;
		width: 100%;
	}
	
	.article-list>* {
		padding: 1rem;
		border-bottom: 1px solid #ccc;
	}
</style>
